﻿	<?php
	/*ob_start();
	$link = mysql_connect("localhost", "root", "");
    if (!$link)
     {
         echo "Khong the ket noi den mysql";
     }
    if (!mysql_select_db ("giasuket_qlhs"))
     {
         echo "Khong the ket noi den db ql_hs";
     }
	include 'class/pager.php';
if (isset($_GET['p']))
    $p = $_GET['p'];
else
    $p = 1;

    
$limit = 20;  // Số dòng hiển thị 1 trang
$start = ($p - 1)* $limit; 
	

$sql = "SELECT * FROM tbl_thuphieu WHERE f_giangvien = 0 and  f_khoa != 2 ORDER BY f_maphieu DESC";
$result = mysql_query($sql);
$total = mysql_num_rows($result);

$sql .= " LIMIT $start,$limit";
$result = mysql_query($sql);



	 
include 'class/class.phieuthu.php';
$phieuthu = new phieuthu;
echo "<table border='1' style='border-collapse: collapse'>";
echo   '<td width="50" bgcolor="#EEEEEE"><font size=2>Mã phiếu</font></td>
			<td width="130"  bgcolor="#EEEEEE"><font size=2>Họ và tên</font></td>
			<td width="170" bgcolor="#EEEEEE"><font size=2>Địa chỉ</font></td>
			<td width="100" bgcolor="#EEEEEE"><font size=2>Hình thức</font></td>
			<td width="70" bgcolor="#EEEEEE"><font size=2>Khóa</font></td>
			<td width="60" bgcolor="#EEEEEE"><font size=2>Ngày bắt đầu</font></td>
			<td width="120" bgcolor="#EEEEEE"><font size=2>Thời khóa biểu</font></td>
			<td width="59" bgcolor="#EEEEEE"><font size=2>Ca</font></td>
			<td width="88" bgcolor="#EEEEEE"><font size=2>Mức lương</font></td>
			<td width="140" bgcolor="#EEEEEE"><font size=2>Yêu cầu</font></td>
			<td width="80" bgcolor="#EEEEEE"><font size=2>Booking</font></td>
			';	
    while ($row = mysql_fetch_array($result))
    { 
	

			  echo "<tr>";
			  echo "<td bgcolor=white>" . $row['f_maphieu'] . "</td>";
			  echo "<td bgcolor=white>" . $row['f_hovaten'] . "</td>";
			  echo "<td bgcolor=white><font size=2>";
				if($row['f_phuong']=='')
				echo 'phường _,Quận';
				else
				echo 'phường '.$row['f_phuong'].',Quận ';
				if($row['f_quan'] == '')
				echo '_,';
				else
				echo $row['f_quan'].',';
				if($row['f_tp'] == '')
				echo '_';
				else
				echo $row['f_tp'];				  
			  echo "</font></td>";
			  echo "<td bgcolor=white><font size=2>" . $row['f_loaihinh'] . "</font></td>";
			  echo "<td bgcolor=white><font size=2>" .$phieuthu-> khoa ($row['f_khoa']) . "</font></td>";
			  echo "<td bgcolor=white><font size=2>" . $row['f_ngaybatdau'] . "</font></td>";
			  echo "<td bgcolor=white><font size=2>" . $row['f_tkb'] . "</font></td>";
			  echo "<td bgcolor=white><font size=2>" . $row['f_ca'] . "</font>	</td>";			  
echo "<td bgcolor=white><font size=2>" . number_format($row['f_muchp']) . "</font>	</td>";			  		
echo "<td bgcolor=white><font size=2>" . $row['f_dkbd_ca'] . "</font>	</td>";			  		
echo "<td bgcolor=white><font size=2> <a href=https://docs.google.com/spreadsheet/viewform?formkey=dGZkMEhob2ZVcEpNZW5tZjRKYld3a0E6MQ mce_href='https://docs.google.com/spreadsheet/viewform?formkey=dGZkMEhob2ZVcEpNZW5tZjRKYld3a0E6MQ' target='_blank'>Booking</a>	</td>";			  		
			  echo "</tr>";
    }
echo "</table>";
$objPaging = new Paging;
// Nếu như phantrang.php của bạn chưa có query string thì bạn cứ thêm ? và 1 biến query string bất kỳ, còn nếu có rồi thì truyền tham số đã có vd phantrang.php?product=$id
$htmlNavigator = $objPaging->createPaging($total, $p, $limit, 'static.php?id=1');

echo "<br>".$htmlNavigator;
*/
echo 'Trang nay khong ton tai';
?>